public class TestTypeScope {
    /**
     * 本类用于测试基本数据类型的最大值与最小值
     */
    public static void main(String[] args) {
        /* 测试整数类型的最小值：“byte short int long” */
        /* Java提供了基本类型对应的工具箱 如“Byte”用“.”来调用工具箱内部对应的方法 */
        byte byteMin = Byte.MIN_VALUE;
        short shortMin = Short.MIN_VALUE;
        int intMin = Integer.MIN_VALUE;
        long longMin = Long.MIN_VALUE;

        /*测试整数类型的最大值：“byte short int long”*/
        byte byteMax = Byte.MAX_VALUE;
        short shortMax = Short.MAX_VALUE;
        int intMax = Integer.MAX_VALUE;
        long longMax = Long.MAX_VALUE;

        /*输出结果*/
        System.out.println("byte的最小值="+byteMin);
        System.out.println("short的最小值="+shortMin);
        System.out.println("int的最小值="+intMin);
        System.out.println("long的最小值="+longMin);

        System.out.println("······························");

        System.out.println("byte的最大值="+byteMax);
        System.out.println("short的最大值="+shortMax);
        System.out.println("int的最大值="+intMax);
        System.out.println("long的最大值="+longMax);

        System.out.println("······························");

        /* 测试浮点类型的最小值：“float double” */
        float floatMin = Float.MIN_VALUE;
        double doubleMain = Double.MIN_VALUE;

        /* 测试浮点类型的最大值：“float double” */
        float floatMax = Float.MAX_VALUE;
        double doubleMAx = Double.MAX_VALUE;

        System.out.println("float的最小值="+floatMin);
        System.out.println("double的最小值="+doubleMain);

        System.out.println("······························");

        System.out.println("float的最大值="+floatMax);
        System.out.println("double的最大值="+doubleMAx);

        System.out.println("······························");

        /*测试布尔类型*/
        boolean b1 = true;
        boolean b2 = false;

        System.out.println("······························");

        char c1 = '中';
        char c2 = 'a';
        char c3 = 98;

        System.out.println(c1);
        System.out.println(c2);
        System.out.println(c3);

    }
}
